﻿Imports System.Data
Imports VSModel
Imports Cls_Common
Imports System.IO
Imports SecurityService
Partial Class Control_QuanLyHoSoTamNgung_ContentActionHistory
    Inherits System.Web.UI.UserControl

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            BindToGrid()
        End If
    End Sub
    Protected Sub BindToGrid()
        Using _data As New VSEntities
            Dim _Id As Integer = Request("Id")

            Dim p = (From q In _data.ContentActionHistories Where q.ObjId = _Id And q.FunctionId = Function_Name.CertifiedTamNgung Order By q.Created Ascending Select q.Id, q.Creator, q.Created, q.Note).ToList
            Dim strKey_Name() As String = {"Id", "Creator"}
            With grdShow
                .DataKeyNames = strKey_Name
                .DataSource = p
                .DataBind()
            End With


        End Using
    End Sub

    Protected Sub grdShow_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles grdShow.RowDataBound
        If e.Row.RowIndex >= 0 Then
            Dim lblSTT As Label = CType(e.Row.FindControl("lblSTT"), Label)
            lblSTT.Text = e.Row.RowIndex + 1
        End If
    End Sub
End Class
